Public: Concord Software Projects : Writing LabVIEW VI's for CAPA Assessment
This page last changed on Apr 07, 2008 by skim.
OverviewThe purpose of a CAPA/LabVIEW assessment is to have the student operate a simulated instrument in a LabVIEW VI and assess her performance by analyzing her answers to questions and the detailed log of her activity. From the VI devoloper's perspective, there are three components in the CAPA/LabVIEW assessment environment:
For an "activity VI" to run as part of a CAPA assessment it should meet certain requirements. Wrapper VIThere must be a wrapper VI that will be stored in the same directory as the activity VI. The monitor runs the wrapper, and the wrapper runs the activity. (The reason we need a wrapper is to make the monitor VI free of any activity-specific code.) Let's say we have a wrapper wrap_my_activity.vi for the activity my_activity.vi. The requirements for the wrapper are: Running the activityThe otrunk/monitor assumes minimal control over the third party activity. Still we need the monitor to be able to send various signals to the activity while it is running, e.g., stop and close the VI.
ParametersThe wrapper must have the following controls with the same names. Input
Output
MethodsThe wrapper must implement two cases for the two possible values of the input parameter function:
ExampleBelow is an example of a simple wrapper that runs an activity named "my.vi": Front panel: Block diagram in "run" case: Block diagram in "close" case: Note that the "Hide front panel" switch in the above VI is not required, but it is useful for development/debugging since you want to test the VI with the front panel open while in production the VI should run hidden. Note also that it is not necessary to set up the connector pane since the wrapper itself will be run dynamically. Here's the link to the VI so you can use it as a template: wrap_my.vi "ready" was just set to true in the above example, but the wrapper can be more complex on some occasions. For example, Activity VIControls and LabelsHere's the algorithm that the monitor uses to get data from activity VI: WHILE in monitoring loop DO IF mouse clicked THEN FOR_EACH control IN the vi DO IF control value has changed from last time THEN add current time, control label, control value to log The monitor can only monitor controls with a label in the front panel. Embedded controls (e.g., controls inside a tab control) are not visible to the monitor. If their values are needed for assessment, they have to pulled out to the top level of the front panel in a way that the values will change only at the time of mouse click. Stopping the VIA boolean contol that can end the main loop in the activity should exist and labeled so that the monitor can set its value to end the activity. It doesn't need to be at the top level.
wrap_my_vi.png (image/png)
wrap_my_vi_block_close.png (image/png) wrap_my.vi (application/octet-stream) wrap_my_vi_block_run.png (image/png) wrap_my_vi_block_run.png (image/png) wrap_scope_vi_block_run.png (image/png) wrap_my.vi (application/octet-stream) wrap_my_vi.png (image/png) wrap_my_vi.png (image/png) wrap_my.vi (application/octet-stream) |
Document generated by Confluence on Jan 27, 2014 16:52 |